package com.normalsys.live.controller;

import com.normalsys.live.service.LiveService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * Project Name: testlive
 * File Name: LiveController
 * Package Name: com.normalsys.live.controller
 * Date: 2018/9/10  13:09
 * Copyright (c) 2018, tianyul All Rights Reserved.
 *
 */
@RestController
@RequestMapping("/live")
@Slf4j
public class LiveController {

    @Autowired
    private LiveService liveService;

    /**
     * 获得开播信息
     * @param req
     * @return
     */
    @PostMapping("/anchor")
    public Map<String,Object> anchor(HttpServletRequest req) {
        Long id = 1L;
        return liveService.getAnchorInfo(id);
    }
}
